package com.chen.apiboos.remote;

import com.chen.internalcommon.dto.Car;
import com.chen.internalcommon.dto.DriverCarBindingRelationship;
import com.chen.internalcommon.dto.DriverUser;
import com.chen.internalcommon.dto.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author chenLiuPing
 **/
@FeignClient("service-driver-user")
public interface ServiceDriverUserClient {

    /**
     * 添加司机信息
     * @param driverUser 司机
     * @return
     */
    @PostMapping("/user")
    ResponseResult addDriverUser(@RequestBody DriverUser driverUser);

    /**
     * 更新司机信息
     * @param driverUser 司机
     * @return
     */
    @PutMapping("/user")
    ResponseResult updateDriverUser(@RequestBody DriverUser driverUser);

    /**
     * 添加车辆信息
     * @param car 车辆
     * @return
     */
    @PostMapping("/car")
    ResponseResult addCar(@RequestBody Car car);

    @PostMapping("/driver-car-binding-relationship/bind")
    ResponseResult bind(@RequestBody DriverCarBindingRelationship driverCarBindingRelationship);

    @PostMapping("/driver-car-binding-relationship/unbind")
    ResponseResult unbind(@RequestBody DriverCarBindingRelationship driverCarBindingRelationship);
}
